package org.iqiyi.feign.hystrix;

import lombok.extern.slf4j.Slf4j;
import org.iqiyi.entity.JWT;
import org.iqiyi.feign.AuthServiceFeign;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class AuthServiceHystrix implements AuthServiceFeign {
    @Override
    public JWT getToken(String authorization, String grantType, String username, String password) {
        log.error("获取JWT Token失败, authorization: {}, grantType: {}, username: {}, password: {}",
                authorization, grantType, username, password);
        throw new RuntimeException();
    }
    @Override
    public JWT refreshToken(String authorization, String grantType, String refreshToken) {
        log.error("获取JWT Token刷新失败, authorization: {}, grantType: {}, refreshToken: {}",
                authorization, grantType, refreshToken);
        throw new RuntimeException();
    }

    @Override
    public JWT getTokenByPhone(String authorization, String grantType, String phone, String verifyCode) {
        log.error("获取JWT Token失败, authorization: {}, grantType: {}, phone: {}, verifyCode: {}",
                authorization, grantType, phone, verifyCode);
        return null;
    }
}